#!/usr/bin/env python3

import os
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

def generate_launch_description():
    # Declare launch arguments
    vehicle_info_path_arg = DeclareLaunchArgument(
        'vehicle_info_path',
        default_value='',
        description='Path to vehicle info JSON file'
    )
    
    map_path_arg = DeclareLaunchArgument(
        'map_path',
        default_value='',
        description='Path to map JSON file'
    )
    
    lane_net_path_arg = DeclareLaunchArgument(
        'lane_net_path',
        default_value='',
        description='Path to lane network JSON file'
    )

    # Physics simulator node
    phy_simulator_node = Node(
        package='phy_simulator',
        executable='phy_simulator_planning_node',
        name='phy_simulator_planning_node',
        output='screen',
        parameters=[
            {
                'vehicle_info_path': LaunchConfiguration('vehicle_info_path'),
                'map_path': LaunchConfiguration('map_path'),
                'lane_net_path': LaunchConfiguration('lane_net_path')
            }
        ],
        remappings=[
            # Add remappings if needed
        ]
    )

    return LaunchDescription([
        vehicle_info_path_arg,
        map_path_arg,
        lane_net_path_arg,
        phy_simulator_node
    ])